package net.service.Impl;

import net.mapper.UserMapper;
import net.pojo.User;
import net.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author admin
 * @Date 2019/3/27 11:30
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public int register(User user) {
        return userMapper.register(user);
    }

    @Override
    public User login(String username, String PASSWORD) {
        return userMapper.login(username,PASSWORD);
    }


    @Override
    public int checkUser(String username) {
        return userMapper.checkUser(username);
    }

    @Override
    public int checkEmails(String email) {
        return userMapper.checkEmails(email);
    }
}
